package cn.sumpu.app.coolsk.domain;

import java.io.Serializable;
import java.util.Date;

import cn.sumpu.app.coolsk.util.WebUtil;
import cn.sumpu.toolkit.common.util.Common;

public class Content implements Serializable {

	public Content(){ }
	public Content(String id, Integer sort){
		this.id = id;
		this.sort = sort;
	}
	
	private static final long serialVersionUID = 5752362189362221474L;
	
	private String id;
	private String channel;
	private String title;
	private String content = "";
	private String summary;
	private String keywords;
	private String author;
	private String source;
	private Integer views;
	private Integer comments;
	private String picture;
	private String picture2;
	private String hyperlink;
	private Integer sort;
	private String tblName;
	private String tblId;
	private Integer status;
	private Date releaseTime;
	private Date gmtCreated;
	private Date gmtModified;
	
	//景区的信息
	private String scenicName;
	private String opened;			//开放时间
	private String address;			//地址
	private String subject;			//地址
	private String scenicDesc;		//景区的简介
	private Scenic scenic;
	//门票信息
	private String ticketName;
	private Ticket ticket;
	
	//酒店信息
	private String hotelName;
	private Integer star;			//酒店的星级
	private String hotelDesc;			//酒店的简介
	private Hotel hotel;
	
	//产品的信息
	private String productName;
	private Product product;
	
	//价格信息
	private Double priceMarket;		//市场价
	private Double priceMin;		//最低价/爽客价
	
	//点评信息
	private int popul;				//人气指数
	private int proportion;			//规模指数
	private int serving;			//服务指数
	private int recreation;			//娱乐指数
	private int overall;			//点评星级
	private int disCount;			//点评数
	private Date discussTime;		//点评时间
	private Discuss discuss;
	//行程的信息
	private String tripTitle;		//行程标题
	private String startDate;		//开始日期
	private Integer days;			//总天数
	private Double price;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getChannel() {
		return channel;
	}
	public void setChannel(String channel) {
		this.channel = channel;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public String getKeywords() {
		return keywords;
	}
	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public Integer getViews() {
		return views;
	}
	public void setViews(Integer views) {
		this.views = views;
	}
	public Integer getComments() {
		return comments;
	}
	public void setComments(Integer comments) {
		this.comments = comments;
	}
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	public Date getGmtCreated() {
		return gmtCreated;
	}
	public void setGmtCreated(Date gmtCreated) {
		this.gmtCreated = gmtCreated;
	}
	public Date getGmtModified() {
		return gmtModified;
	}
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}
	public String getTblName() {
		return tblName;
	}
	public void setTblName(String tblName) {
		this.tblName = tblName;
	}
	public String getTblId() {
		return tblId;
	}
	public void setTblId(String tblId) {
		this.tblId = tblId;
	}
	public String getPicture() {
		return picture;
	}
	public void setPicture(String picture) {
		this.picture = picture;
	}
	public String getHyperlink() {
		return hyperlink;
	}
	public void setHyperlink(String hyperlink) {
		this.hyperlink = hyperlink;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getReleaseTime() {
		return releaseTime;
	}
	public void setReleaseTime(Date releaseTime) {
		this.releaseTime = releaseTime;
	}
	public Double getPriceMarket() {
		return priceMarket;
	}
	public void setPriceMarket(Double priceMarket) {
		this.priceMarket = priceMarket;
	}
	public Double getPriceMin() {
		return priceMin;
	}
	public void setPriceMin(Double priceMin) {
		this.priceMin = priceMin;
	}
	public String getTicketName() {
		return ticketName;
	}
	public void setTicketName(String ticketName) {
		this.ticketName = ticketName;
	}
	public String getHotelName() {
		return hotelName;
	}
	public void setHotelName(String hotelName) {
		this.hotelName = hotelName;
	}
	public Integer getStar() {
		return star;
	}
	public void setStar(Integer star) {
		this.star = star;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public String getScenicName() {
		return scenicName;
	}
	public void setScenicName(String scenicName) {
		this.scenicName = scenicName;
	}
	public String getOpened() {
		return opened;
	}
	public void setOpened(String opened) {
		this.opened = opened;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getPicture2() {
		return picture2;
	}
	public void setPicture2(String picture2) {
		this.picture2 = picture2;
	}
	public int getPopul() {
		return popul;
	}
	public void setPopul(int popul) {
		this.popul = popul;
	}
	public int getProportion() {
		return proportion;
	}
	public void setProportion(int proportion) {
		this.proportion = proportion;
	}
	public int getServing() {
		return serving;
	}
	public void setServing(int serving) {
		this.serving = serving;
	}
	public int getRecreation() {
		return recreation;
	}
	public void setRecreation(int recreation) {
		this.recreation = recreation;
	}
	public int getOverall() {
		return overall;
	}
	public void setOverall(int overall) {
		this.overall = overall;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public Date getDiscussTime() {
		return discussTime;
	}
	public void setDiscussTime(Date discussTime) {
		this.discussTime = discussTime;
	}
	public String getTripTitle() {
		return tripTitle;
	}
	public void setTripTitle(String tripTitle) {
		this.tripTitle = tripTitle;
	}
	public String getStartDate() {
		return startDate;
	}
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}
	public Integer getDays() {
		return days;
	}
	public void setDays(Integer days) {
		this.days = days;
	}
	public String getScenicDesc() {
		return scenicDesc;
	}
	public void setScenicDesc(String scenicDesc) {
		this.scenicDesc = scenicDesc;
	}
	public String getHotelDesc() {
		return hotelDesc;
	}
	public void setHotelDesc(String hotelDesc) {
		this.hotelDesc = hotelDesc;
	}
	public String getContentText(){
		String text="";
		if(!Common.emptyStr(content)){
			text=Common.filterHtml(content);
			text=text.replaceAll(" ","");
			if(text.length()>200){
				text=text.substring(0, 200)+"...";
			}
		}
		return text;
	}
	public String getTitleText(){
		String text="";
		if(Common.notEmptyStr(title)){
			text=Common.filterHtml(title);
			text=text.replaceAll(" ","");
			if(text.length()>200){
				text=text.substring(0, 200)+"...";
			}
		}
		return text;
	}
	public String getDiscuss(Integer d){
		if(d == 1){
			return "很烂";
		}else if(d == 2){
			return "一般";
		}else if(d == 3){
			return "还好";
		}else if(d == 4){
			return "较好";
		}else{
			return "很好";
		}
	}
	
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public String getPopulStr(){
		return getDiscuss(popul);
	}
	
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public String getProportionStr(){
		return getDiscuss(proportion);
	}
	public String getServingStr(){
		return getDiscuss(serving);
	}
	public String getRecreationStr(){
		return getDiscuss(recreation);
	}
	public String getHotelDescText(){
		String text="";
		if(Common.notEmptyStr(hotelDesc)){
			text=Common.filterHtml(hotelDesc);
			text=text.replaceAll(" ","");
			if(text.length()>200){
				text=text.substring(0, 200)+"...";
			}
		}
		return text;
	}
	public String getScenicDescText(){
		String text="";
		if(Common.notEmptyStr(scenicDesc)){
			text=Common.filterHtml(scenicDesc);
			text=text.replaceAll(" ","");
			if(text.length()>200){
				text=text.substring(0, 200)+"...";
			}
		}
		return text;
	}
	public Ticket getTicket() {
		return ticket;
	}
	public void setTicket(Ticket ticket) {
		this.ticket = ticket;
	}
	public Discuss getDiscuss() {
		return discuss;
	}
	public void setDiscuss(Discuss discuss) {
		this.discuss = discuss;
	}
	public Hotel getHotel() {
		return hotel;
	}
	public void setHotel(Hotel hotel) {
		this.hotel = hotel;
	}
	public Scenic getScenic() {
		return scenic;
	}
	public void setScenic(Scenic scenic) {
		this.scenic = scenic;
	}
	public String getWapCutContent(){
		return Common.cutStr(WebUtil.stripTags(content), 200, "...");
	}
	public int getDisCount() {
		return disCount;
	}
	public void setDisCount(int disCount) {
		this.disCount = disCount;
	}
	
}
